<?php
//初始化get参数
$getUrl = "?";
if(isset($_GET)){
	foreach ($_GET as $k => $v){
		if($k == 'p') continue;
		$getUrl .= "$k=$v&";	
	}
}

?>

<?php if ($this->pageCount): ?> 
<!-- Previous page link --> 
<?php if (isset($this->previous)): ?> 
  <a href="<?=$getUrl?>p=<?php echo $this->previous; ?> ">< 上一页</a> | 
<?php else: ?> 
  <span class="disabled">< 上一页</span> | 
<?php endif; ?> 

<!-- Numbered page links -->
<?php foreach ($this->pagesInRange as $page): ?> 
  <?php if ($page != $this->current): ?>
    <a href="<?=$getUrl?>p=<?php echo $page; ?>"><?= $page; ?></a> | 
  <?php else: ?>
    <?= $page; ?> | 
  <?php endif; ?>
<?php endforeach; ?>

<!-- Next page link --> 
<?php if (isset($this->next)): ?> 
  <a href="<?=$getUrl?>p=<?php echo $this->next; ?>">下一页 ></a>
<?php else: ?> 
  <span class="disabled">下一页 ></span>
<?php endif; ?> 

<?php endif; ?>
